<?php
if (!defined('SITE_PATH')) exit();

$db_prefix = C('DB_PREFIX');

$sql = array(
	"DROP TABLE IF EXISTS `{$db_prefix}cms_site`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_blockclassify`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_block`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_blockcontent`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_category`;",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_article;",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_artfield;",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_templates`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_controlstype`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_class`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_attachment`",
	"DROP TABLE IF EXISTS `{$db_prefix}cms_comments`",
	"DELETE FROM `{$db_prefix}system_data` WHERE `list` = 'cmsconfig'",
);

foreach ($sql as $v)
	M('')->execute($v);